<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="layout" content="plantilla_4"> 
    <title><g:message code="login.auth.titulo"/></title>
  </head>
  <body>
  <g:if test="${!session['seguridad_usuario']}">
    <script>
      document.location = "../login/auth";
    </script>
  </g:if>
  <g:if test="${estatus == 1}">
    <script type="text/javascript">

      function redireccion() {
          document.location.href="../principal/index";
      }
      setTimeout("redireccion()",3000);
    </script>
  </g:if>
  <table width="900" border="0" align="center">
    <tr>
      <td height="400" align="center" valign="top"><div class="marco" align="center" >
          <div class="contenedor">
            <div class="header"></div>
            <div class="nav"></div>
            <div class="loginForm"  id="loginForm">
              <table class="marco">
                <tr>
                  <td  align="center" valign="middle"><div style="width:300px;">
                      <g:if test="${flash.message}">
                        <div class="${estilo}">${flash.message}</div>
                        <g:if test="${directivas && directivas.size()>0}">
                          <div class="errors">
                            <ul>
                              <g:each in="${directivas}" var="directiva">
                                <li>
                                <g:message code="${'directiva.'+directiva.code}" args="${[directiva.valor]}"/>
                                </li>
                              </g:each>
                            </ul>
                          </div>
                        </g:if>
                      </g:if>
                    </div>
                    <form id="loginForm" action="actualizarPassword" method="POST" class="cssform">
                      <p>
                        <label for="j_username" class="labels"></label>
                      </p>
                      <table class="inicioSesion">
                        <tr>
                          <th colspan="2" scope="col"><span class="fheader">
                              <h2>
                                <g:message code='login.actualizarPassword.inf'/>
                              </h2>
                            </span>
                          </th>
                        </tr>

                        <tr>
                          <td width="120"></td>
                          <td width="150"></td>
                        </tr>
                        <tr>
                          <td><label style="margin-left:15px;" class="labels">
                              <g:message code="login.actualizarPassword.password" />
                            </label></td>
                          <td><input type="password" name="new_password" style="width:170px" class="campos"/></td>
                        </tr>
                        <tr>
                          <td><label style="margin-left:15px;" class="labels">
                              <g:message code="login.actualizarPassword.password_b" />
                            </label></td>
                          <td><input type="password"  style="width:170px" name="new_password_b" class="campos"/></td>
                        </tr>
                        <tr>
                          <td colspan="2" height="15px;">&nbsp;</td>
                        </tr>
                        <tr>
                          <td colspan="2" align="center"><table width="200" border="0" align="center">
                              <tr>
                                <td><div align="center">
                                    <g:submitButton name="login" value="${message(code:'login.actulizarPassword.submit')}" class="boton" />
                                  </div></td>
                              </tr>
                            </table>
                          </td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                      </table>
                      <p>
                        <label for="j_password"></label>
                      </p>
                      <p>&nbsp;</p>
                      <input type="hidden" name="flag" value="1"/>
                    </form></td>
                </tr>
              </table>
            </div>
          </div>
        </div></td>
    </tr>
  </table>
  <script>
        document.getElementById('loginForm').style.height=document.body.clientHeight-106;
  </script>
</body>
</html>